home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue79 / misc / tougher / socket_exceptions.hpp.txt < prev    next >
Encoding:
Text File  |  2002-08-14  |  1.3 KB  |  63 lines

  1. //
  2. //
  3. // Copyright 2002 Rob Tougher <robt@robtougher.com>
  4. //
  5. // This file is part of xmlrpc.
  6. //
  7. // xmlrpc is free software; you can redistribute it and/or modify
  8. // it under the terms of the GNU General Public License as published by
  9. // the Free Software Foundation; either version 2 of the License, or
  10. // (at your option) any later version.
  11. //
  12. // xmlrpc is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License
  18. // along with xmlrpc; if not, write to the Free Software
  19. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20. //
  21. //
  22.  
  23.  
  24. #ifndef _socket_exception_classes_
  25. #define _socket_exception_classes_
  26.  
  27.  
  28. #include <string>
  29.  
  30.  
  31. namespace sockets
  32. {
  33.   //
  34.   // base exception class
  35.   //
  36.   class exception
  37.   {
  38.   public:
  39.     exception ( const std::string s ) : m_s ( s ) {}
  40.     ~exception () {}
  41.  
  42.     std::string description() const { return m_s; }
  43.  
  44.   private:
  45.     std::string m_s;
  46.   };
  47.  
  48.  
  49.   //
  50.   // socket exception
  51.   //
  52.   class socket_exception : public exception
  53.   {
  54.   public:
  55.     socket_exception ( const std::string s ) : exception ( s ) {}
  56.     ~socket_exception () {}
  57.   };
  58.  
  59.  
  60. }
  61.  
  62. #endif
  63.